package ch9;

/**
 * @author oldliu
 * @since 1.0
 */
public class Pingfang2 {
    public static void main(String[] args) {

        //x加上100是个完全平方数，再加上168也是一个完全平方数
        for (int x = -100; x <= 64 * 64 - 100; x++) {
            int a = x + 100;
            int b = a + 168;
            //a和b都是完全平方数
            int i = (int) Math.sqrt(a);
            int j = (int) Math.sqrt(b);
            if (i * i == a && j * j == b)
                System.out.println(x + "满足条件");
        }
    }
}
